
<h2 class="sub-header">Bloging List</h2>
<div class="table-responsive">
<pager total={total} current={current} on-nav={this.refresh($event.page, true)}></pager>
  <table class="table table-striped">
    <thead>
      <tr>
        <th>id</th>
        <th>author</th>
        <th>time</th>
        <th>title</th>
        <th>abstract</th>
        <th>action</th>
      </tr>
    </thead>
    <tbody>
      {#list blogs as blog by blog_index}
      <tr>
        <td>{blog.id}</td>
        <td>{blog.user.name}</td>
        <td>{blog.time|format}</td>
        <td>{blog.title}</td>
        <td>{blog.content.slice(0,30) + "..."}</td>
        <td>
        <div class="btn-group" role="group" aria-label="...">
          <a  href={'app.blog.edit'|encode: {id: blog.id} } class="btn btn-default">edit</a>
          <a href={'app.blog.detail'|encode: {id: blog.id} } class="btn btn-default">view</a>
          <a href='#' on-click={this.remove(blog, blog_index)} class="btn btn-danger">delete</a>
        </div>
      </td>
      </tr>
      {/list}
    </tbody>
  </table>
  <pager total={total} current={current} on-nav={this.refresh($event.page, true)}></pager>
</div>





